
import {createRouter,  createWebHistory} from 'vue-router'
import {ROUTE, constantRouterMap} from './router.config'

console.log('路由', ROUTE)
// const originalPush = createRouter.prototype.push
// createRouter.prototype.push = function push(location, onResolve, onReject) {
//   if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
//   return originalPush.call(this, location).catch(err => err)
// }
const router = createRouter({
  history: createWebHistory(),
  routes: ROUTE.concat(constantRouterMap)
})
export default router
